import request from '@/utils/request'

// 查询农产品品种  列表
export function listVariety(query) {
  return request({
    url: '/variety/variety/list',
    method: 'get',
    params: query
  })
}
//统计种类下的品种数量
export function getcountspe() {
  return request({
    url: '/variety/variety/getcountspe',
    method: 'get'
  })
}


// 查询农产品品种  详细
export function getVariety(id) {
  return request({
    url: '/variety/variety/' + id,
    method: 'get'
  })
}
// 查询农产品品种  详细
export function getAllVariety(speciesId) {
  return request({
    url: '/variety/variety/getAllVariety/' + speciesId,
    method: 'get'
  })
}

// 新增农产品品种
export function addVariety(data) {
  return request({
    url: '/variety/variety',
    method: 'post',
    data: data
  })
}

// 修改农产品品种
export function updateVariety(data) {
  return request({
    url: '/variety/variety',
    method: 'put',
    data: data
  })
}

// 删除农产品品种
export function delVariety(id) {
  return request({
    url: '/variety/variety/' + id,
    method: 'delete'
  })
}
